Adding Traits to (Statically Typed) Languages
نویسندگان
چکیده
Traits offer a fine-grained mechanism for composing classes in object-oriented languages from reusable components, while avoiding the fragility problems introduced by multiple inheritance and mixins. Although traits were developed in the context of dynamically typed languages, they would also offer clear benefits for statically typed languages like Java and C#. This report summarizes the issues raised when integrating traits into such languages. We examine traits in the context of the statically typed languages Featherweight Java, C# and C++. CR
منابع مشابه
Flattening Traits
Traits are fine-grained components that can be used to compose classes, while avoiding many of the problems of multiple inheritance and mixin-based approaches. Since most implementations of traits have focused on dynamically-typed languages, the question naturally arises, how can one best introduce traits to statically-typed languages, like Java and C#? In this paper we argue that the flattenin...
متن کاملEfficient virtual machine support of runtime structural reflection
Increasing trends towards adaptive, distributed, generative and pervasive software have made object-oriented dynamically typed languages become increasingly popular. These languages offer dynamic software evolution by means of reflection, facilitating the development of dynamic systems. Unfortunately, this dynamism commonly imposes a runtime performance penalty. In this paper, we describe how t...
متن کاملAdding Dynamic Types to C#
Developers using statically typed languages such as C and Java increasingly have to interoperate with APIs and object models defined in dynamic languages. This impedance mismatch results in code that is difficult to understand, awkward to analyze, and expensive to maintain. In this paper we describe new features in C4.0 that support the safe combination of dynamically and statically typed code ...
متن کاملStatic type information to improve the IDE features of hybrid dynamically and statically typed languages
The flexibility offered by dynamically typed programming languages has been appropriately used to develop specific scenarios where dynamic adaptability is an important issue. This has made some existing statically typed languages gradually incorporate more dynamic features to their implementations. As a result, there are some programming languages considered hybrid dynamically and statically ty...
متن کاملDynamically Typed Languages
Dynamically typed languages such as Python and Ruby have experienced a rapid grown in popularity in recent times. However, there is much confusion as to what makes these languages interesting relative to statically typed languages, and little knowledge of their rich history. In this chapter I explore the general topic of dynamically typed languages, how they differ from statically typed languag...
متن کامل